package com.filldream.fastboot;

import com.filldream.fastboot.common.util.SpringContextHolder;
import org.dromara.easyes.starter.register.EsMapperScan;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling
@EnableCaching
@EnableAsync
@EsMapperScan("com.filldream.fastboot.base.es.mapper")
@MapperScan("com.filldream.fastboot.base.**")
public class FastBootApplication {
    public static void main(String[] args) {
        SpringApplication.run(FastBootApplication.class,args);
    }

    @Bean
    public SpringContextHolder springContextHolder() {
        return new SpringContextHolder();
    }
}